#ifndef TESTDATA_H
#define TESTDATA_H


#include "CorrelationParent.h"
#include "Correlation.h"


/*
  */
class Data : public CorrelationParent {


public:  // Non-Correlation tests


    /* ----- Test Class Test ----------------------------------------------------------------------------------------- */

    void testTest(int whichTest, Correlation *c);


    /* ----- Class Implementation Functions -------------------------------------------------------------------------- */

    void correlationConstructor(int whichTest, Correlation *c);


public:  // Correlation-specific tests


    /* ----- Level 0 Functions --------------------------------------------------------------------------------------- */

    bool analyzeImage(int whichTest, Correlation *c);
    void storePositionField(int whichTest, Correlation *c);
    void storeStrainField(int whichTest, Correlation *c);
    void outputImage(int whichTest, Correlation *c);
    void outputOverlay(int whichTest, Correlation *c);


    /* ----- Level 1 Functions --------------------------------------------------------------------------------------- */

    void loadPersistentValues(int whichTest, Correlation *c);
    void savePersistentValues(int whichTest, Correlation *c);
    bool inputImage(int whichTest, Correlation *c);
    void blobAnalysis(int whichTest, Correlation *c);
    void extractPositionField(int whichTest, Correlation *c);
    void generateGridMap(int whichTest, Correlation *c);
    void computeStrain(int whichTest, Correlation *c);
    void drawCurrentState(int whichTest, Correlation *c);


    /* ----- Level 2 Functions --------------------------------------------------------------------------------------- */

    void subsetImage(int whichTest, Correlation *c);
    void filterImage(int whichTest, Correlation *c);
    void matchBlob(int whichTest, Correlation *c);
    void updateBoundingBox(int whichTest, Correlation *c);
    void mergeBlobs(int whichTest, Correlation *c);
    void postProcess(int whichTest, Correlation *c);
    void blobProbability(int whichTest, Correlation *c);
    void identifyDots(int whichTest, Correlation *c);
    void isValidPointSet(int whichTest, Correlation *c);
    void localStrain(int whichTest, Correlation *c);
    double minAbs(int whichTest, Correlation *c);
    double maxAbs(int whichTest, Correlation *c);
    void minIgnore(int whichTest, Correlation *c);
    void maxIgnore(int whichTest, Correlation *c);
    void drawBlobProperty(int whichTest, Correlation *c);
    void drawCurrentPixel(int whichTest, Correlation *c);
    void debugHandle(int whichTest, Correlation *c);


private:  // Internal functions


    /* ----- Data Class Helper Functions ----------------------------------------------------------------------------- */

    // Load a particular set of points for later comparison with the correlation object
    void loadPointSet(int whichPointSet=0);


public:  // Non-derived parameters


    /* ----- Data Class Variables ------------------------------------------------------------------------------------ */

    string pathNames[1001];
    string fileNames[1000];

    double pt[2][3];
    double ptStar[2][3];


};

#endif // TESTDATA_H
